// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_CUSTOMER_SALESMAN
// * CreateDate    : 2014-06-05 18:30:14
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:14
// * LastChanger   : 2014-06-05 18:30:14
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstCustomerSalesmanEntity : EntityBase
    {
        public MstCustomerSalesmanTable TableSchema
        {
            get
            {
                return MstCustomerSalesmanTable.Current;
            }
		}
		
		public MstCustomerSalesmanEntity()
        {

        }
		
		public MstCustomerSalesmanEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.SalesmanNo = Convert.ToString(CommonFunctions.ToObject(dr["SALESMAN_NO"]));
			this.SalesmanName = Convert.ToString(CommonFunctions.ToObject(dr["SALESMAN_NAME"]));
        }
		
		public MstCustomerSalesmanEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.SalesmanNo = Convert.ToString(CommonFunctions.ToObject(dr["SALESMAN_NO"]));
			this.SalesmanName = Convert.ToString(CommonFunctions.ToObject(dr["SALESMAN_NAME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCustomerSalesmanTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstCustomerSalesmanTable.C_ID)); }
            set { SetData(MstCustomerSalesmanTable.C_ID, value); }
        }
		
        [DataMember]
        public string CustomerId
        {
            get { return Convert.ToString(GetData(MstCustomerSalesmanTable.C_CUSTOMER_ID)); }
            set { SetData(MstCustomerSalesmanTable.C_CUSTOMER_ID, value); }
        }
		
        [DataMember]
        public string SalesmanNo
        {
            get { return Convert.ToString(GetData(MstCustomerSalesmanTable.C_SALESMAN_NO)); }
            set { SetData(MstCustomerSalesmanTable.C_SALESMAN_NO, value); }
        }
		
        [DataMember]
        public string SalesmanName
        {
            get { return Convert.ToString(GetData(MstCustomerSalesmanTable.C_SALESMAN_NAME)); }
            set { SetData(MstCustomerSalesmanTable.C_SALESMAN_NAME, value); }
        }
		
		#endregion
	}
	
	
}	

